using XLua;

/// <summary>
/// 资源访问
/// </summary>
[LuaCallCSharp]
public static class AssetUtility
{
    /// <summary>
    /// 表格获取
    /// </summary>
    /// <param name="tableName"></param>
    /// <returns></returns>
    public static string GetTableAsset(string tableName)
    {
        return $"Assets/RuntimeResources/DataTables/{tableName}.txt";
    }
    /// <summary>
    /// 获取实体
    /// </summary>
    /// <param name="entityName"></param>
    /// <returns></returns>
    public static string GetEntity(string entityName)
    {
        return $"Assets/RuntimeResources/Entities/{entityName}.prefab";
    }
    /// <summary>
    /// 表格
    /// </summary>
    /// <param name="configName"></param>
    /// <returns></returns>
    public static string GetConfig(string configName)
    {
        return $"Assets/RuntimeResources/Config/{configName}.txt";
    }

    public static string GetLua(string luaFileName)
    {
        return $"Assets/RuntimeResources/Lua/{luaFileName}.lua.txt";
    }

    public static string GetRole(string name)
    {
        return $"Assets/RuntimeResources/Roles/{name}.prefab";
    }
    /// <summary>
    /// 获取ui界面
    /// </summary>
    /// <param name="formName"></param>
    /// <returns></returns>
    [LuaCallCSharp]
    public static string GetUIForm(string formName)
    {
        return $"Assets/RuntimeResources/UIForms/{formName}.prefab";
    }
    /// <summary>
    /// 获取场景名称
    /// </summary>
    /// <param name="sceneName"></param>
    /// <returns></returns>
    public static string GetScene(string sceneName)
    {
        return $"Assets/RuntimeResources/Scenes/{sceneName}.unity";
    }
}